'use strict';
app.controller('RecommendCtrl', function($scope,ShoppingService,TokenService,$stateParams) {
    var carId = $stateParams.catId;
    var moreType = $stateParams.moreType;

    $scope.groupBuyMore={}
    function recommendInit () {
        TokenService.getLocalUserId().then(function (user_id) {
        ShoppingService.getRecommend(carId,user_id,1,5).then(function (data) {
            $scope.recommendData = data;
        })
        })
        ShoppingService.getGroupBuyMore(moreType,1,5).then(function (res) {
            $scope.groupBuyMore = res;

        })
    }
    recommendInit();
});
